-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: runs ls
#640
feat: runs ls
#640
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If issue is not linked to the pull request then estimate the pull request!
src/commands/runs/ls.ts
Outdated
|
||
const client = await getLoggedClientOrThrow(); | ||
|
||
// TODO: technically speaking, we don't *need* an actor id to list builds. But it makes more sense to have a table of builds for a specific actor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does this TODO mean? maybe it should be just a regular comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been copied 1:1 from builds (where the same is applicable). We don't need an actor id passed/present to list builds/runs, as we can fetch global list, but it makes more sense to fetch per-actor. Probably best to decide for runs if that still is the case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am actually using this page quite often, i dont think we should disallow listing all runs of a given user. i agree with builds, that feels weird without the actor context.
what i mean with my comment is that the TODO is not telling me what is missing, what should be done, what is to do, heh
|
||
const datasetInfos = new Map( | ||
await Promise.all( | ||
allRuns.items.map(async (run) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is effectively N+1 problem, which is never a good thing to have in your code. let's try asking on slack if there is some way to get the data with a single API request
it's not a huge deal if there wont be too many items in the list (and we use default limit of 10, so fini'ish as long as the user doesn't try to list last 200 runs...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed on slack, we'll keep this because we can't do much at this time, and implement a spinner in the future
d7ae261
to
f891cce
Compare
build number should be also aligned to right btw |
i'll do it for builds too (thankfully now its ezpz and super clear how to do so) 😄 |
Tackles one of the runs task in #619
Depends on #620
Runs list for Actor:
Message when no runs are found (inactive actor)
JSON output